Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ray AWS Cluster Config Generator #47

Merged
merged 9 commits into from
Mar 2, 2023
Merged

Conversation

yinweisu
Copy link

@yinweisu yinweisu commented Mar 1, 2023

Issue #, if available:

Description of changes:

  • Implemented RayAWSClusterConfigGenerator. It has a default config and accepts user config override. Also allow users to update the config with frequent used parameters that are available in fit call, i.e. instance_type

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link

github-actions bot commented Mar 1, 2023

Job PR-47-96d5217 is done.
Docs are uploaded to https://d12sc05jpx1wj5.cloudfront.net/PR-47/96d5217/index.html

src/autogluon/cloud/cluster/cluster_config_generator.py Outdated Show resolved Hide resolved
def _update_config(
self,
instance_type: Optional[str] = None,
instance_count: Optional[str] = None,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not set it to 1 as a default and change type to int in the API?
instance_count: int = 1 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be int, that's a mistake. Though if we specify a default value for instance_count, we will always update the config to have instance_count = 1 even when user left it blank. I'll stick with default = None, meaning user doesn't want to update it

Comment on lines +95 to +101
def _set_provider(self):
"""Set provider to be default ones if user didn't provide any"""
default_config = self._default_config
provider: Dict[str, Any] = self.config.get(PROVIDER, None)
if provider is None:
provider = default_config[PROVIDER]
self.config.update({PROVIDER: provider})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we templatize repeating methods: I see lots of repeating code which can be reuse between the _update_xxx methods.

Copy link
Author

@yinweisu yinweisu Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is hard to templatize these methods because they are essentially trying to update keys and values lying in different layers of the yaml file. The method looks similar, but because the structure of the yaml file differs for each key, it's actually specific

@github-actions
Copy link

github-actions bot commented Mar 2, 2023

Job PR-47-a74b280 is done.
Docs are uploaded to https://d12sc05jpx1wj5.cloudfront.net/PR-47/a74b280/index.html

@yinweisu yinweisu merged commit 6b3b95c into autogluon:master Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants